package com.thinkersre.dao;

import com.thinkersre.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CommentMapper {
    List<Comment> selectCommentsByEntity(int entityType,int entityId,int offset,int pageSize);
    int selectCountByEntity(int entityType, int entityId);
    int insertComment(Comment comment);
    Comment selectCommentById(int id);

    List<Comment> selectCommentsByUserId(int userId, int entityType, int offset, int limit);

    int selectCountByUserId(int userId, int entityType);
}
